|
|
|
|
|
|
|
Caution If you want to restrict the ListView display option to only Report, remove any toolbar buttons or menu options that would allow users to change the display. |
|
|
|
|
|
|
|
|
|
The other routine called from the NodeClick event displays the data-entry form for the selected name. This requires a small change to the frmAddressEntry to get the use the SQL statement that's created and display the correct record. Listing 10.12 shows this code. |
|
|
|
|
|
|
|
|
LISTING 10.12. ADDRDAO5.TXTMODIFYING THEForm_LoadCODE IN THEfrmAddressEntryFORM. |
|
|
|
 |
|
|
|
|
1: Private Sub Form_Load()
2: If sqlEntry = Then
3: sqlEntry = select * from [Address Entry]
4: End If
5: datPrimaryRS.RecordSource = sqlEntry
6: datPrimaryRS.Refresh
7: If datPrimaryRS.Recordset.RecordCount = 0 Then _
datPrimaryRS.Recordset.AddNew
8: End Sub |
|
|
|
|
|
|
|
|
Now, run the application again and try out the new functions you just added. |
|
|
|
|
|
|
|
|
In this section, you add a combo box to allow users to select a state to add to an entry. The state abbreviations are retrieved from a reference table in the database and displayed in the drop-down list. To make the process dynamic, users also can enter state abbreviations as needed and have them added to the database. To start the process, add a data-bound combo box to the data-entry form in place of the original state text box (see Figure 10.15). |
|
|
|
|
|